package ooday02;

public class tecther extends person{
    String classname;
    double saiary;
    tecther(int age, String name, String address, String classname, double saiary){
        super(name,address,age);
        this.classname=classname;
        this.saiary=saiary;

    }
    void eat(){
        System.out.println(name+"正在吃饭花了工资的5五分之一"+saiary/5);
    }
    void eat(String name ){
       System.out.println(this.name+"去餐厅吃饭约了"+name);
    }
    void teach(String name){
        System.out.println(this.name+"拿着"+saiary+"的工资正在讲课");
        super.eat();
        this.eat(name);
    }


}
